package edu.gdin.ecommerce.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import edu.gdin.ecommerce.util.Pager;

@Repository("cardDAO")
public class CardDAO extends BaseDAO {
	
	public Pager getCardPagerByAccountId(Integer id, int cpg){
		String hql = "from Card c where c.account.accountId ="+id;
		return this.getPage(hql, cpg);
	}
	
	public Pager getCardRecoredByAccountId(Integer id, int cpg){
		String hql = "from CardRecord c where c.account.accountId ="+id;
		return this.getPage(hql, cpg);
	}
}
